package com.rw.pojo;

public class Teacher {
    private String name;
    private Integer tid;

    public Teacher() {

    }

    public Teacher(String name, Integer tid) {
        this.name = name;
        this.tid = tid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getTid() {
        return tid;
    }

    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public void speak(String msg){
        System.out.println("老师说:"+msg);
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", tid=" + tid +
                '}';
    }
}

